package com.xzcedu.properties_;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

/**
 * @author 徐州城
 * @version 1.0
 */
public class Properties01 {
    public static void main(String[] args) throws IOException {

        //读取mysql.properties文件，并得到ip，user 和 pwd
        BufferedReader br = new BufferedReader(new FileReader("src\\com\\xzcedu\\properties_\\mysql.properties"));
        String line = "";

        while ((line = br.readLine()) != null) {//循环读取
//            System.out.println(line);
            String[] split = line.split("=");
            //如果需要指定的ip
            System.out.println(split[0] + "值是：" + split[1]);
        }

        br.close();
    }
}
